<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<style>
    body{
        font-family:Arial;
    }    
</style>
<body>
    
    <script>
    
        for(var i=1;i<=6;i++){
    for(var k=0;k<6-i;k++){
        document.write("&nbsp;");
    }
    for(var j=1;j<=2*i-1;j++){
        document.write("*");
    }
    document.write("<br/>");
}
        
    </script>
</body>
</html>